package test.designmode.buttonlistener2;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by shuoGG on 2018/8/10
 */
public class EventHandler {
    private List<Job> jobList = new ArrayList();

    public void addJob(Object obj, String method, Object... arg) {
        jobList.add(new Job(obj, method, arg));
    }

    public void invokeAll() throws Exception {
        for (Job job : jobList) {
            job.invoke();
        }
    }
}
